import { __ } from '@wordpress/i18n';
export const INPUT_VARIABLE_SUGGESTIONS =
window?.surerank_globals?.input_variable_suggestions ?? null;
export const ROBOTS_OPTIONS = [
{
id: 'post_no_index',
value: 'no',
label: __( 'No index', 'surerank' ),
description: __(
'Prevents search engines from listing your page in search results.',
'surerank'
),
},
{
id: 'post_no_follow',
value: 'no',
label: __( 'No follow', 'surerank' ),
description: __(
'Tells search engines not to follow any links on your page.',
'surerank'
),
},
{
id: 'post_no_archive',
value: 'no',
label: __( 'No archive', 'surerank' ),
description: __(
'Blocks search engines from storing a cached version of your page.',
'surerank'
),
},
];
export const getDefaultPageDescription = () =>
__(
'This content will be set as the meta description tag and may appear in search results. Keep it short and clearly explain what the page is about.',
'surerank'
);
export const ADMIN_DASHBOARD_URL =
window?.surerank_globals?.wp_dashboard_url ?? '';
export const DESCRIPTION_LENGTH =
window?.surerank_globals?.description_length ?? 160;
export const TITLE_LENGTH = window?.surerank_globals?.title_length ?? 60;
export const URL_LENGTH = window?.surerank_globals?.url_length ?? 90;
export const getSearchEnginePreviewInfoText = () => (
<>
{ __(
'View a preview of how your page may appear in search engine results. This preview is for guidance only and might not exactly match how search engines display your content.',
'surerank'
) }
{ __( 'Site Icon: ', 'surerank' ) }
{ __(
'The site icon (favicon) appears in browser tabs, bookmarks, and mobile devices. To update it, go to General Settings → Site Icon and upload a new image under Site Identity.',
'surerank'
) }{ ' ' }
{ __( 'Change Here', 'surerank' ) }
>
);
export const MAX_EDITOR_INPUT_LENGTH = 500;
export const ENABLE_PAGE_LEVEL_SEO =
window?.surerank_globals?.enable_page_level_seo ?? false;
export const ENABLE_GOOGLE_CONSOLE =
window?.surerank_globals?.enable_google_console ?? false;
export const ENABLE_SCHEMAS = window?.surerank_globals?.enable_schemas ?? false;
export const ENABLE_MIGRATION =
window?.surerank_globals?.enable_migration ?? false;
// Content generation
export * from './content-generation';
// Site SEO Fix Types
export * from './site-seo-fix';
// Process status
export * from './process-status';
// Page SEO Checks
export const PAGE_SEO_CHECKS_LEARN_MORE_URL =
'https://surerank.com/docs-category/page-seo-analysis/';
/* globals FusionEvents */
var FusionPageBuilder = FusionPageBuilder || {};
( function( $ ) {
jQuery( document ).ready( function() {
FusionPageBuilder.Fusion_Widget_Flickr = FusionPageBuilder.fusion_widget_content.extend( {
onInit: function() {
this._getFlickrContent = _.debounce( this.getFlickrContent, 500 );
// NOTE: reset markup so DOM html is not used ( it requires js to be fired );
this.model.attributes.markup = '';
},
/**
* Get Flickr images
*
* @since 6.0
* @param {Object} view
* @return {void}
*/
getFlickrContent: function ( view, userID, apiKey, perPage ) {
$.ajax( {
type: 'GET',
url: 'https://api.flickr.com/services/rest/?format=json&method=flickr.photos.search&user_id=' + userID + '&api_key=' + apiKey + '&nojsoncallback=1&per_page=' + perPage + '&media=photos'
} )
.done( function( reponse ) {
var images = '';
if ( 'ok' != reponse.stat ) {
// If this executes, something broke!
return;
}
_.each( reponse.photos.photo, function( photo ) {
var t_url, p_url;
//notice that "t.jpg" is where you change the
//size of the image
t_url = '//farm' + photo.farm +
'.static.flickr.com/' + photo.server + '/' +
photo.id + '_' + photo.secret + '_s.jpg';
p_url = '//www.flickr.com/photos/' +
photo.owner + '/' + photo.id;
images += '